<?php
/**
 * Definition set and get methods to data obtained/transmitted in the table
 * 
 * This is a class generated with Zend_CodeGenerator.
 * 
 * @category ###CATEGORY###
 * @package ###PACKAGE###
 * @subpackage ###SUBPACKAGE###
 * @version $Id$
 * @license New BSD
 */


class User_Model_Rules extends Core_Model_Abstract
{

    protected $_rule_id = null;

    protected $_role_id = null;

    protected $_resource_id = null;

    protected $_action_id = null;

    protected $_allow = null;

    public function setRule_id($rule_id)
    {
        $this->_rule_id = $rule_id;
    }

    public function getRule_id()
    {
        return $this->_rule_id;
    }

    public function setRole_id($role_id)
    {
        $this->_role_id = $role_id;
    }

    public function getRole_id()
    {
        return $this->_role_id;
    }

    public function setResource_id($resource_id)
    {
        $this->_resource_id = $resource_id;
    }

    public function getResource_id()
    {
        return $this->_resource_id;
    }

    public function setAction_id($action_id)
    {
        $this->_action_id = $action_id;
    }

    public function getAction_id()
    {
        return $this->_action_id;
    }

    public function setAllow($allow)
    {
        if (!is_numeric($allow)) {
            $allow = $allow == 'allow' ? 1 : 0;
        }
        $this->_allow = $allow;
    }

    public function getAllow()
    {
        if (null !== $this->_allow) {
            $this->setAllow('allow');
        } else {
            $this->setAllow('deny');
        }
        return $this->_allow;
    }


}

